Lock Diagnostics Write

The Lock Diagnostics Write category provides summary information about database write lock usage. You can use this information when analyzing system performance.

Write lock usage percentages can be up to a maximum of 100% (which comprises a single lock held for the full duration of the measurement period). Highest usage activities typically comprise, for example, flushing of historic files to disk.

As a general guide, on a healthy system that is operating efficiently, you would expect write locks to be consuming less than 10% of overall database lock usage (allowing for variations for specific activities that are known to consume more resources than others). However, lock usage can be very variable and should be judged in the context of the size of the system and how that system has been configured. While there might be peaks in lock usage, you should focus on the average time that the system spends under write locks. The lower the number then the better.

For status information regarding locks in Geo SCADA Expert, see Locks. The Locks category displays all locks within the server, whereas database locks are specific to the 'database' and assist in identifying which operation is causing high lock utilization.

The database write locks are shown in rows, with each row representing a different lock. The status information shown for each lock is as follows:

You can access a context-sensitive menu by right-clicking on an entry in the list.

The options that are available are:

These menu options apply to both database read and database write locks together. So, for example, the Reset Lock Diagnostics option will reset the write lock diagnostics and the read lock diagnostics.

Priority of Write Locks over Read Locks

With regard to lock priority, typically a database write will block further reads in order to allow the write to be performed as soon as possible after the current read. Where possible, a read lock in a query engine is released when a write is pending. Additionally, a read lock in a database save is released frequently if a write is pending. Likewise, a read lock in the standby synchronization of historic data is released if a write lock is pending. These each reduce the amount of time that a write lock has to wait for a read lock to finish.

The following diagrams indicate how database locks are typically handled.

High Priority Writes

A pending write lock will block new read locks:

A long write lock (such as a Logic program that is running a query without NOCACHE) can block further read locks from occurring until that write lock has completed.

Read Locks when a Write Lock is Detected

Where possible, read locks are released if the server detects that a write lock is pending. This reduces the amount of time that a write lock has to wait in order for a current read lock to finish:


Disclaimer

Geo SCADA Expert 2022